how to convert string to original value in js